<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>地图 - Map</title>
    <link rel="stylesheet" href="styles.css">
    <style>
        /* Page-specific styles for the map layout */
        body, html {
            height: 100%;
        }
        /* Ensure the container takes full viewport height minus the fixed nav */
        .container {
            padding-bottom: 0;
            height: calc(100% - 55px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .map-wrapper {
            flex-grow: 1;
            position: relative;
        }
        .map-header {
            position: fixed; /* Fixed to overlay map */
            top: 0;
            left: 0;
            right: 0;
            padding: 10px 15px;
            background-color: rgba(255, 255, 255, 0.9);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 500;
            z-index: 100;
        }
        .map-header-time {
            font-size: 16px;
        }
        .search-bar {
            background-color: #eee;
            padding: 8px 15px;
            border-radius: 20px;
            flex-grow: 1;
            margin: 0 10px;
            text-align: left;
            font-size: 14px;
            line-height: 1;
            height: 20px;
            display: flex;
            align-items: center;
            text-decoration: none;
            color: #333;
        }
        #map {
            width: 100%;
            height: 100%;
            /* Minimal visual simulation for a map */
            background-color: #e6f0ff;
            background-image: repeating-linear-gradient(0deg, #d0e0d0, #d0e0d0 10px, #e6f0ff 10px, #e6f0ff 20px);
            position: relative;
            z-index: 1;
            padding-top: 40px; /* Space for the fixed header */
            box-sizing: border-box;
        }
        .zoom-controls {
            position: absolute;
            bottom: 20px;
            left: 10px;
            display: flex;
            flex-direction: column;
            background-color: white;
            border-radius: 4px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            z-index: 50;
        }
        .zoom-controls button {
            background: none;
            border: none;
            padding: 8px 10px;
            font-size: 20px;
            cursor: pointer;
            color: #333;
        }
        .zoom-controls button:first-child {
            border-bottom: 1px solid #eee;
        }
    </style>
</head>
<body>
    <div class="map-wrapper">
        <div class="map-header">
            <div class="map-header-time">12:30</div>
            <a href="#" class="search-bar">圣地? (搜索框)</a>
            <div>📶</div>
        </div>

        <div id="map">
            <div style="text-align: center; padding-top: 50px; color: #888;">
                [此处为地图显示区域]
                <br>
                在下方 JavaScript 中填入您的地图 API 初始化代码
            </div>
        </div>

        <div class="zoom-controls">
            <button id="zoom-in">+</button>
            <button id="zoom-out">-</button>
        </div>
    </div>

    <div class="bottom-nav">
        <a href="index.html" class="nav-item">
            <span class="icon">🏠</span>
            <span>首页</span>
        </a>
        <a href="discovery.html" class="nav-item">
            <span class="icon">🔍</span>
            <span>动态</span>
        </a>
        <a href="map.html" class="nav-item active">
            <span class="icon">🗺️</span>
            <span>手气不错</span>
        </a>
        <a href="collection_list.html" class="nav-item">
            <span class="icon">📚</span>
            <span>收藏</span>
        </a>
        <a href="profile.html" class="nav-item">
            <span class="icon">👤</span>
            <span>我的</span>
        </a>
    </div>
    
    <script>
        /**
         * 地图 API 接口暴露区域
         * * 步骤:
         * 1. 引入您的地图 SDK 脚本 (如 Google Maps, AMap, Baidu Map)。
         * 2. 在下方 initMap 函数中，使用 SDK 初始化地图对象到 <div id="map"> 元素中。
         * 3. 如果使用 Google Maps, 请确保在引入脚本时设置 callback=initMap。
         * * function initMap() {
         * const defaultCenter = { lat: 22.5305, lng: 113.945 }; // 深圳荔香公园附近
         * const map = new google.maps.Map(document.getElementById("map"), {
         * zoom: 12,
         * center: defaultCenter,
         * });
         * // 可以在此添加标记点 (Marker) 等
         * // new google.maps.Marker({ position: defaultCenter, map: map, title: "景区" });
         * }
         * * // 如果不使用回调机制，可以在 DOMContentLoaded 后手动调用 initMap()。
         * */

        document.addEventListener('DOMContentLoaded', () => {
            console.log('Map Page loaded. Ready for API integration.');
            
            // 模拟缩放控制交互
            document.getElementById('zoom-in').addEventListener('click', () => {
                alert('地图放大');
            });
            document.getElementById('zoom-out').addEventListener('click', () => {
                alert('地图缩小');
            });
        });
    </script>
</body>
</html>